.md_preview {
  // -----------------------------整体样式 -----------------------------------------//
  font-family: PingFang SC, system-ui, Microsoft YaHei, SF UI Text,
    \5fae\8f6f\96c5\9ed1, -apple-system, "Ubuntu Mono", Arial, Hiragino Sans GB,
    sans-serif;
  word-break: break-word;
  overflow: auto;
  box-sizing: border-box;

  // -----------------------------标题 -----------------------------------------//
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: #292929;
    margin: 8px 0 16px;
    font-weight: 600;
  }
  h1 {
    font-size: 22px;
    line-height: 30px;
  }
  h2 {
    font-size: 20px;
    line-height: 28px;
  }
  h3 {
    font-size: 18px;
    line-height: 26px;
  }
  h4 {
    font-size: 16px;
    line-height: 24px;
  }
  h5 {
    font-size: 16px;
    line-height: 24px;
  }
  h6 {
    font-size: 16px;
    line-height: 24px;
  }

  // -----------------------------段落 -----------------------------------------//
  p {
    font-size: 16px;
    color: var(--md-editor-text-color-active, #292929);
    font-weight: 400;
    line-height: 26px !important;
    margin: 0 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    &[align="center"] {
      text-align: center;
    }
  }

  // -----------------------------列表 -----------------------------------------//
  ol,
  ul {
    margin: 0 0 24px;
    padding: 0;
    font-size: 16px;
    line-height: 1.5;
  }
  ul {
    ol {
      margin: 0 0 24px 32px;
    }
    li {
      list-style-type: disc;
      margin: 8px 0 0 32px;
    }
  }
  ol {
    li {
      list-style-type: decimal;
      margin-left: 40px;
      margin-top: 8px;
    }
  }

  // -----------------------------图像 -----------------------------------------//
  img {
    max-width: 100%;
    display: block;
    // height: auto;
    &.right {
      border: 1px solid #ccc;
      float: right;
      margin-left: 15px;
      padding: 5px;
    }
    &.left {
      border: 1px solid #ccc;
      float: left;
      margin-right: 15px;
      padding: 5px;
    }
    &.mathcode {
      margin: 0 8px;
    }
  }
  .image-clean {
    border: 0;
    background: 0 0;
    padding: 0;
    & > figcaption {
      font-size: 0.9em;
      text-align: right;
    }
  }
  .image-grayscale {
    background-color: #fff;
    color: #666;
  }
  .image-grayscale img,
  img.image-grayscale {
    filter: grayscale(100%);
  }

  // -----------------------------链接 -----------------------------------------//
  a {
    color: #1b9aee;
    text-decoration: none;
    & > img {
      padding: 1px;
      margin: 1px;
      border: none;
      outline: #0782c1 solid 1px;
    }
    &:visited {
      color: #6795b5;
    }
    &:focus,
    &:hover {
      color: #ca0c16;
    }
  }

  // -----------------------------kdb -----------------------------------------//
  kbd {
    padding: 2px 8px;
    border: 1px solid rgba(63, 63, 63, 0.25);
    box-shadow: 0 1px 0 rgba(63, 63, 63, 0.25);
    background-color: #fff;
    color: #333;
    border-radius: 4px;
    display: inline-block;
    margin: 0 2px;
    white-space: nowrap;
  }

  // -----------------------------代码 -----------------------------------------//
  kbd,
  pre,
  samp {
    font-family: Consolas, Inconsolata, Courier, monospace;
    font-size: 14px;
    line-height: 22px;
    // color: #000;
  }
  pre {
    background: #282c34;
    margin: 0 0 24px;
    padding: 8px;
    border: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    code {
      display: block;
      line-height: 22px;
      overflow-x: auto;
      overflow-y: hidden;
      white-space: pre;
      word-wrap: normal;
      border-radius: 4px;
      padding: 8px;
      tab-size: 4;
      code {
        &.md_hljs {
          padding: 0;
        }
      }
      &.md_hljs[class="md_hljs"] {
        color: #abb2bf;
        background: #282c34;
      }
    }
    button.md_preview_copybtn {
      border: none;
      color: #abb2bf;
      background: #282c34;
      position: absolute;
      top: 8px;
      right: 8px;
      cursor: pointer;
      display: none;
    }
    &:hover button.md_preview_copybtn {
      display: inline-block;
    }
  }
  pre[data-from="code-for-outside"] {
    overflow: hidden;
    code {
      overflow-x: auto;
      overflow-y: hidden;
      * {
        overflow: visible;
        overflow-wrap: break-word;
      }
    }
    p {
      code {
        padding: 0;
      }
    }
  }
  code {
    border-radius: 4px;
    display: inline-block;
    padding: 2px 6px;
    font-family: -apple-system, system-ui, SF UI Text, Arial, PingFang SC,
      Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei,
      SimSun;
    ol {
      margin: 0;
      overflow: hidden;
      li {
        list-style-type: none;
        margin-left: 0;
        margin-top: 0;
        height: 22px;
        div {
          &.hljs-ln-code {
            margin-left: 8px;
          }
          &.hljs-ln-numbers {
            width: 24px;
            border-right: 1px solid #c5c5c5;
            .hljs-ln-line {
              word-wrap: normal;
            }
          }
        }
      }
      &.hundred {
        li {
          div {
            &.hljs-ln-numbers {
              width: 30px;
            }
          }
        }
      }
      &.thousand {
        li {
          div {
            &.hljs-ln-numbers {
              width: 36px;
            }
          }
        }
      }
    }
  }
  code ol li div.hljs-ln-code,
  code ol li div.hljs-ln-numbers,
  pre code,
  pre code div,
  pre code span {
    font-family: "Source Code Pro", "DejaVu Sans Mono", "Ubuntu Mono",
      "Anonymous Pro", "Droid Sans Mono", Menlo, Monaco, Consolas, Inconsolata,
      Courier, monospace, "PingFang SC", "Microsoft YaHei", sans-serif;
  }
  pre code,
  pre code div,
  pre code span {
    font-size: 14px;
  }
  .prettyprint,
  pre.prettyprint {
    margin: 0 0 24px;
    padding: 8px 16px 4px 56px;
    background-color: #f6f8fa;
    border: none;
  }
  pre code .hljs-comment {
    color: #1da91d;
    font-style: normal;
  }
  code ol li div.hljs-ln-code,
  code ol li div.hljs-ln-numbers {
    float: left;
    height: 22px;
  }

  // highlight atom-one-dark 主题
  code.hljs {
    color: #abb2bf;
    background: #282c34;
  }

  // -----------------------------表格 -----------------------------------------//
  table {
    border-collapse: collapse;
    display: table;
    width: 100%;
    text-align: left;
    margin-bottom: 24px;
    margin-left: auto;
    margin-right: auto;
    tr {
      border: 0;
      border-top: 1px solid #ddd;
      background-color: #fff;
      &:nth-child(2n) {
        background-color: #f7f7f7;
      }
      th {
        font-weight: 700;
        background-color: #eff3f5;
        p {
          font-weight: 700;
        }
      }
    }
  }
  tbody {
    border: 0;
  }
  table tr td,
  table tr th {
    border: 1px solid #ddd;
    font-size: 14px;
    color: #4f4f4f;
    line-height: 22px;
    padding: 8px;
    text-align: left;
  }
  table tr td p,
  table tr th p {
    font-size: 14px;
    color: #4f4f4f;
    margin: 0;
    padding: 0;
    text-align: left;
    line-height: 22px;
  }
  table tr td code,
  table tr th code {
    white-space: normal;
    word-break: break-word;
  }

  // -----------------------------引用 -----------------------------------------//
  blockquote {
    display: block;
    padding: 16px 16px 0;
    margin: 0 0 24px;
    border-left: 8px solid #dddfe4;
    background: #eef0f4;
    overflow: auto;
    /* -webkit-overflow-scrolling: touch; */
    word-wrap: normal;
    word-break: normal;
    p {
      font-size: 16px;
      line-height: 26px;
      font-weight: 400;
      margin-bottom: 16px;
      color: #4f4f4f;
    }
    ol,
    ul {
      margin-bottom: 16px;
      padding: 0;
      font-size: 16px;
      line-height: 24px;
      li {
        margin-bottom: 0;
      }
    }
  }

  // -----------------------------内容元素 -----------------------------------------//
  figure {
    text-align: center;
    margin: 0 24px;
    display: inline-block;
    & > figcaption {
      text-align: center;
      margin: 8px;
      color: #999;
      font-size: 14px;
      display: block;
    }
  }

  // -----------------------------描述列表 -----------------------------------------//
  dl {
    margin: 24px;
    dt {
      margin: 8px;
      font-weight: 700;
      dd {
        margin: 8px;
      }
    }
    dd {
      margin: 0 0 8px 40px;
    }
  }

  // -----------------------------分隔线 -----------------------------------------//
  hr {
    margin: 24px 0;
    border: none;
    border-bottom: solid #ccc 1px;
  }

  // -----------------------------缩写元素 -----------------------------------------//
  abbr[data-original-title],
  abbr[title] {
    cursor: help;
    border-bottom: 1px dotted #999;
  }

  address,
  cite,
  dfn,
  em,
  em strong,
  i,
  span[lang],
  var {
    font-style: italic;
  }

  strong,
  strong span,
  strong em {
    font-weight: 700;
  }

  // -----------------------------流程图, mermaid, katex -----------------------------------------//
  .flow-chart,
  .sequence-diagram {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px !important;
  }
  .flow-chart [fill="#000"],
  .flow-chart [fill="#000000"],
  .flow-chart [fill="black"],
  .sequence-diagram [fill="#000"],
  .sequence-diagram [fill="#000000"],
  .sequence-diagram [fill="black"] {
    fill: #4f4f4f;
  }
  .flow-chart [stroke="#000000"],
  .sequence-diagram [stroke="#000000"] {
    stroke: #4f4f4f;
  }

  .mermaid {
    text-align: center;
  }
  .katex-block {
    display: block;
    text-align: center;
  }

  // -----------------------------定制类名 -----------------------------------------//
  .md_video {
    position: relative;
    width: 300px;
    height: 200px;
    video {
      display: block;
      width: 100%;
      height: 100%;
    }
    &::after {
      cursor: not-allowed;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      content: "";
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.6) url("@/assets/img/play.svg")
        center/cover no-repeat;
    }
  }

  .marker {
    background-color: #ff0;
  }

  .code-featured {
    border: 5px solid red;
  }
  .math-featured {
    padding: 20px;
    box-shadow: 0 0 2px rgba(200, 0, 0, 1);
    background-color: rgba(255, 0, 0, 0.05);
    margin: 10px;
  }

  .embed-240p {
    max-width: 426px;
    max-height: 240px;
    margin: 0 auto;
  }
  .embed-360p {
    max-width: 640px;
    max-height: 360px;
    margin: 0 auto;
  }
  .embed-480p {
    max-width: 854px;
    max-height: 480px;
    margin: 0 auto;
  }
  .embed-720p {
    max-width: 1280px;
    max-height: 720px;
    margin: 0 auto;
  }
  .embed-1080p {
    max-width: 1920px;
    max-height: 1080px;
    margin: 0 auto;
  }

  .initialism {
    font-size: 90%;
    text-transform: uppercase;
  }

  .hot-keyword {
    &:visited {
      color: #3399ea;
    }
  }
  .footnote {
    vertical-align: top;
    position: relative;
    top: -4px;
    font-size: 12px;
  }
  .MathJax_SVG_Display {
    text-align: center;
    margin: 24px 0;
    font-size: 18px;
    font-weight: 400;
    color: #4f4f4f;
    position: relative;
    text-indent: 0;
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    width: 100%;
  }
  .prettyprint {
    .pre-numbering {
      position: absolute;
      width: 48px;
      background-color: #eef0f4;
      top: 0;
      left: 0;
      margin: 0;
      padding: 8px 0;
      list-style: none;
      text-align: right;
    }
  }
  .pre-numbering {
    li {
      padding: 0 8px;
      list-style: none;
      margin: 0;
    }
  }
  .dp-highlighter {
    font-size: 12px;
    text-align: left;
    margin: 0 0 24px;
  }
  .csdn-data-video {
    width: 200px;
    img {
      margin: 0;
      display: block;
      width: 200px;
      height: 112px;
    }
    p {
      margin-top: 10px;
      margin-bottom: 0;
      font-size: 14px;
    }
  }
  .cke_editable {
    margin: 24px;
    word-wrap: break-word;
  }
}
